package private1;

import java.util.Scanner;

public class CarTester4 {
    public static void main(String[] args) {
        Scanner stdIn=new Scanner(System.in);
        System.out.println("请输入汽车的数据：");
        System.out.println("名称：");String name=stdIn.next();
        System.out.println("车宽：");int width=stdIn.nextInt();
        System.out.println("车长：");int length=stdIn.nextInt();
        System.out.println("车高：");int height=stdIn.nextInt();
        System.out.println("燃料：");double fuel=stdIn.nextDouble();
        System.out.println("购买年份");int y=stdIn.nextInt();
        System.out.println("购买月");int m=stdIn.nextInt();
        System.out.println("购买日");int d=stdIn.nextInt();
        Car1 car2=new Car1(name,width,length,height,fuel,new Day(y,m,d));
        car2.putSpec();
        System.out.println("购买日期："+car2.getPurchaseDay());
    }
}
